#include <iostream>
using namespace std;

/*
    3.int fun(int 'n1=666,float n2=88.8,const char *n3="粤嵌",double n4=99. 9)
        我现在是四个形参都是默认值
        请问C++能不能部分默认，部分不默认. 如果部分默认，有什么语法规定
        函数定义的时候参数必须从右到左连续
        默认--》站在封装函数的角度
*/

// int fun(int n1 = 666, float n2 = 88.8, const char *n3 = "粤嵌", double n4 = 99.9)
// {
//     cout << n1 << " " << n2 << " " << n3 << " " << n4 << endl;
//     return 0;
// }

// int fun(int n1, float n2, const char *n3, double n4 = 99.9)
// {
//     cout << n1 << " " << n2 << " " << n3 << " " << n4 << endl;
//     return 0;
// }

int fun(int n1, float n2, const char *n3 = "粤嵌", double n4 = 99.9)
{
    cout << n1 << " " << n2 << " " << n3 << " " << n4 << endl;
    return 0;
}

int main()
{
    fun(1, 2, "abc", 3.14);
    fun(1, 2, "abc");
    return 0;
}